package com.iwomy.secureplat.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 故障记录表
 *
 * @author pig
 * @date 2023-11-23 10:49:50
 */
@Data
@TableName("basic_device_fault_record")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "故障记录表")
public class BasicDeviceFaultRecordEntity extends Model<BasicDeviceFaultRecordEntity> {


	/**
	 * ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@Schema(description = "ID")
	private Long id;

	/**
	 * 设备id
	 */
	@Schema(description = "设备id")
	private Long deviceId;

	/**
	 * IMEI
	 */
	@Schema(description = "IMEI")
	private String imei;


	/**
	 * 安装地点id
	 */
	@Schema(description = "安装地点id")
	private Long installLocationId;

	/**
	 * 工单类型
	 */
	@Schema(description = "工单类型")
	private String eventType;

	/**
	 * 故障描述
	 */
	@Schema(description = "故障描述")
	private String description;

	/**
	 * 所属单位
	 */
	@Schema(description = "所属单位")
	private Long deptId;

	/**
	 * 状态 10 已处理 20 处理中 30 未处理
	 */
	@Schema(description = "状态 10 已处理 20 处理中 30 未处理")
	private Integer state;

	/**
	 * 设备类型
	 */
	@Schema(description = "设备类型")
	private Long deviceTypeId;

	/**
	 * 设备型号
	 */
	@Schema(description = "设备型号")
	private Long deviceModelId;

	/**
	 * 附件
	 */
	@Schema(description = "附件")
	private String file;

	/**
	 * 申报人
	 */
	@Schema(description = "申报人")
	private String declarer;


	/**
	 * 排序
	 */
	@Schema(description = "排序")
	private Integer sort;

	/**
	 * 创建人
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建人")
	private String createBy;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 修改人
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@Schema(description = "修改人")
	private String updateBy;

	/**
	 * 修改时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@Schema(description = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 是否被删除标记（0未删除；1已删除）
	 */
	@TableLogic
	@TableField(fill = FieldFill.INSERT)
	@Schema(description = "是否被删除标记（0未删除；1已删除）")
	private String delFlag;

	/**
	 * 租户id
	 */
	@Schema(description = "租户id")
	private Long tenantId;
}